<?php
 
$comment = $_POST['comment'];
$publisher = $_POST['publisher'];
$date = date("Y-m-d H:i:s");

$dbname = 'OPlJkRdhWkRyICoiPusd';
$host = 'sqld.duapp.com';
$port = 4050;
$user = 'X6ZL8EyTI5Xqf3v8WFcHOQCb';//用户名(api key)
$pwd = '4Brp0cLHGUsEkVTDhaWMN7IU9t2apffK';//密码(secret key)

// Create connection
$con = mysqli_connect($host,$user,$pwd,$dbname,$port);
mysqli_set_charset($con, "utf8");
// Check connection
if (mysqli_connect_errno($con))
  {
  echo "Failed to connect to MySQL: " . mysqli_connect_error();
  }

mysqli_query($con, "INSERT INTO page_comment (publisher, comment,pageID) VALUES ('$publisher','$comment','start')");
if(mysqli_insert_id($con)>0)
	echo "<tr><td>$comment</td><td>$publisher</td><td>$date</td></tr>";
else
	echo 0;
mysqli_close($con);


 
?>
